
<div class="modal-header">
    <h4 class="modal-title">订单信息 
    	<!-- [ <span ng-if="obj.cancel_state == '0'"> 正常 </span>
	  	<span ng-if="obj.cancel_state == '1'" class="red"> 订单已取消 </span>
	  	<small><span ng-if="obj.cancel_state == '1'" > 
	  		时间：{{obj.cancel_time}} 原因：{{obj.cancel_reason}} 
	  	</span></small>
	  	 ] -->
	  	[ 
	  	<span ng-if="obj.ticket_state == '0'"> 未出票 </span>
	  	<span ng-if="obj.ticket_state == '1'"> 出票中 </span>
	  	<span ng-if="obj.ticket_state == '2'"> 出票完成 </span>
	  	<span ng-if="obj.ticket_state == '9'"> 出票失败 ， 原因 : {{obj.cancel_reason}}</span>
	  	]



    </h4>

    <h4 class="modal-title"></h4>
</div>
<div class="modal-body">

<div class="container-fluid">
	<div class="panel panel-default">
	  	<div class="panel-heading">
	  		基本信息 

	  	</div>
	  	<div class="table-responsive">
	  	<table class="table">
	        <thead>
	          <tr>
	            <th class="text-center">订单编号</th>
	            <th class="text-center">订单标题</th>
	            <th class="text-center">型号</th>
	            <th class="text-center">下单时间</th>
	            <th class="text-center">数量</th>
	          </tr>
	        </thead>
	        <tbody>
	          <tr>
	            <td class="text-center">{{obj.code}}</td>
	            <td class="text-center">{{obj.title}}</td>
	            <td class="text-center">{{obj.attr_name}}</td>
	            <td class="text-center">{{obj.create_time}}</td>
	            <td class="text-center">购买 : {{obj.num}} | 使用 : {{obj.used}} | 退 : {{obj.back}}</td>
	          </tr>
	        </tbody>
	    </table>
	    </div>
	</div>


	<div class="panel panel-default">
	  	<div class="panel-heading">支付信息</div>
	  	<div class="table-responsive">
	  	<table class="table">
	        <thead>
	          <tr>
	            <th class="text-center">交易金额</th>
	            <th class="text-center">支付状态</th>
	            <th class="text-center">支付时间</th>
	            <th class="text-center">交易号</th>
	            <th class="text-center">支付类型</th>
	          </tr>
	        </thead>
	        <tbody>
	          <tr>
	            <td class="text-center">{{obj.pay_fee}}</td>
	            <td class="text-center">{{obj.pay_state_label}}</td>
	            <td class="text-center">{{obj.pay_time}}</td>
	            <td class="text-center">{{obj.pay_trade_no}}</td>
	            <td class="text-center">{{obj.payment_type_label}}</td>
	          </tr>
	        </tbody>
	    </table>
	    </div>
	</div>

	<div class="panel panel-default" ng-if="obj.tkt.length != 0">
	  	<div class="panel-heading">
	  		票信息 [ <span style="color: red;">{{ticketcode}}</span> ]
	  	</div>
	  	<div class="" ng-repeat="tkttype in obj.tkt  track by $index">
	  	<div class="table-responsive">
	  	<table class="table"
	  	 
	  	>
	        <thead>
	          	<th class="col-md-3 text-center">商家名称</th>
                <th class="col-md-4 text-center">票名称</th>
                <th class="col-md-1 text-center">票码</th>
                <th class="col-md-2 text-center">使用情况</th>
                <th class="col-md-2 text-center">最后操作</th>
	        </thead>
	        <tbody>
	          <tr ng-repeat="t in tkttype.ticketarr">
                <td class="text-center">{{t.place_name}}</td>
                <td class="text-center">{{t.type_name}}</td>
                <td class="text-center">{{t.code}}</td>
                <td class="text-center">
                	<span class="text-success" ng-if="t.state == '1'">可用
                	</span>
                	&nbsp;&nbsp;
                	<button class="btn btn-info btn-xs"
	                	ng-click="cancellation(t)"
	                	ng-if="t.state == '1'"
	                >核销</button>
                	<span class="text-danger" ng-if="t.state == '0' && t.used == '1'">已使用</span>
                	<span class="text-warning" ng-if="t.state == '0' && t.back == '1'">已退</span>
                </td>
                <td class="text-center">{{t.otime}}</td>
              </tr>
              <!-- <tr >
              	<td class="text-center"></td>
                <td class="text-center"></td>
                <td class="text-center"></td>
                <td class="text-center"></td>
                <td class="text-right">
                	
                	<button class="btn btn-danger "
                	ng-click="back(tkttype)"
                	>退票</button>
                </td>
              </tr> -->
	        </tbody>
	    </table>
	    <hr>
	    </div>
	    </div>
	</div>


	<div class="panel panel-default">
	  	<div class="panel-heading">购买信息</div>
	  	<div class="table-responsive">
	  	<table class="table">
	        <thead>
	          <tr>
	            <th class="text-center">用户头像</th>
	            <th class="text-center">用户信息</th>
	            <th class="text-center">产品编号</th>
	            <th class="text-center">产品价格</th>
	            <th class="text-center">备注</th>
	          </tr>
	        </thead>
	        <tbody>
	          <tr>
	            <td class="text-center">
	            	<img ng-src="{{obj.uid_headimg}}" style="width:40px;height: 40px;" >
	            </td>
	            <td class="text-center">
	            	{{obj.uid_nickname}}<br>
	            	{{obj.mobile}}
	            </td>
	            <td class="text-center">{{obj.product_code}}</td>
	            <td class="text-center">{{obj.guide_price}}</td>
	            <th class="text-center">{{obj.remark}}</th>
	          </tr>
	        </tbody>
	    </table>
	    </div>
	</div>


	<div class="panel panel-default" ng-if="obj.openid != undefined">
	  	<div class="panel-heading">一级分销信息</div>
	  	<div class="table-responsive">
	  	<table class="table">
	        <thead>
	          <tr>
	            <th class="text-center">分销者头像</th>
	            <th class="text-center">分销者昵称</th>
	            <th class="text-center">分销佣金</th>
	          </tr>
	        </thead>
	        <tbody>
	          <tr>
	            <td class="text-center">
	            	<img ng-src="{{obj.headimg}}" style="width:40px;height: 40px;" >
	            </td>
	            <td class="text-center">
	            	{{obj.nickname}}
	            </td>
	            <td class="text-center">
	            
	            <span ng-if="obj.profit_state == '0'">
	            	{{obj.profit}} * {{obj.used}} = {{obj.profit * obj.used}}
	            </span>
	            <span ng-if="obj.profit_state == '1'">
	            	{{obj.profit}} * {{obj.num}} = {{obj.profit * obj.num}}
	            </span>

	            </td>
	          </tr>
	        </tbody>
	    </table>
	    </div>
	  	
	</div>


	<div class="panel panel-default" ng-if="obj.openid1 != undefined">
	  	<div class="panel-heading">二级分销信息</div>
	  	<div class="table-responsive">
	  	<table class="table">
	        <thead>
	          <tr>
	            <th class="text-center">分销者头像</th>
	            <th class="text-center">分销者昵称</th>
	            <th class="text-center">分销佣金</th>
	          </tr>
	        </thead>
	        <tbody>
	          <tr>
	            <td class="text-center">
	            	<img ng-src="{{obj.headimg1}}" style="width:40px;height: 40px;" >
	            </td>
	            <td class="text-center">
	            	{{obj.nickname1}}
	            </td>
	            <td class="text-center">
	            	<span ng-if="obj.profit_state == '0'">
		            	{{obj.profit1}} * {{obj.used}} = {{obj.profit1 * obj.used}}
		            </span>
		            <span ng-if="obj.profit_state == '1'">
		            	{{obj.profit1}} * {{obj.num}} = {{obj.profit1 * obj.num}}
		            </span>
		        </td>
	          </tr>
	        </tbody>
	    </table>
	    </div>
	  	
	</div>


	<div class="panel panel-default" >
	  	<div class="panel-heading">退票历史</div>
	  	<div class="table-responsive">
	  	<table class="table table-bordered">
            <thead>
              <tr>
                <th class="col-md-2 text-center">申请时间</th>
                <th class="col-md-2 text-center">退款时间</th>
                <th class="col-md-1 text-center">退款状态</th>
                <th class="col-md-1 text-center">退票状态</th>
                <th class="col-md-1 text-center">退票数量</th>
                <th class="col-md-1 text-center">退票金额</th>
                <th class="col-md-1 text-center">退票机构</th>
                <th class="col-md-3 text-center">退款流水号</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="back in backarr">
                <td class="text-center">{{back.create_time}}</td>
                <td class="text-center">{{back.update_time}}</td>
                <td class="text-center">{{back.back_state_label}}</td>
                <td class="text-center">{{back.refund_state_label}}</td>
                <td class="text-center">{{back.back_count}}</td>
                <td class="text-center">{{back.back_price | currency : '¥'}}</td>
                <td class="text-center">{{back.ta_code}}</td>
                <td class="text-center">{{back.transaction_id}}</td>
                
              </tr>
            </tbody>
        </table>
        </div>
	  	
	</div>

</div>

</div>
<div class="modal-footer">
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div>
